/*
 * @Author: 晴鸢. 3013433857@qq.com
 * @Date: 2025-08-30 10:36:38
 * @LastEditors: 晴鸢. 3013433857@qq.com
 * @LastEditTime: 2025-08-30 12:59:12
 * @FilePath: /Learn/fifo/client.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include"common.hpp"
using namespace std;
int main()
{
     int fd=open(FIFO_FILE,O_WRONLY);
     if(fd<0)
     {
        perror("open");
        exit(FIFO_OPEN_ERR);
     }
     string line;
     while(1)
     {
        cout<<"Please Enter@ ";
        getline(cin,line);
        write(fd,line.c_str(),line.size());
     }
    return 0;
}
